#include "log.h"
#include <time.h>
#include <time.h>
#include <stdio.h>

#define ERRO 1
#define SUCESSO 0

Log::Log()
{
}
int Log::logc(const char*msg){
    FILE *txt;
    if((txt = fopen("SenderLog.txt", "a+")) == NULL)
    {
        return ERRO;
    perror("Descricao do erro");
    }

    time_t now = time(0);
    struct tm* tm = localtime(&now);
    fprintf(txt, "%s info: %s\n", asctime (tm), msg);
    fclose(txt);

    return SUCESSO;
}
